#!/bin/awk
BEGIN{
i=0
}
{
sum1 += $2;
sum2 += $3;
a[i]=$2
b[i]=$3
i++;
}
END{
avg1=sum1/i;
avg2=sum2/i;
for (j=0;j<i;j++)
   {
    s=(a[j] - avg1)*(b[j]-avg2)
    z=z+s
   }
xfc=z/(i-1)
print "数学平均分"avg1"，语文平均分"avg2"，协方差"xfc
}
